from PredictOneCell.readJsonData import read_json_to_matrix
from PredictOneCell.train_one_cell import train_model_one_cell
import os.path

if __name__ == '__main__':

    json_path = '../bock_count_json'      # json文件夹路径
    rows = 25
    columns = 45                  # 格子的行与列数
    cell_num = 348    # 预测哪一个格子

    # 获取数据
    train_data = read_json_to_matrix(json_path, rows, columns)
    # 如果模型不存在则进行预测，并保存模型
    train_model_one_cell(train_data, cell_num, time_step=1, epochs=5, split=0.8)
    print("model trained and saved")











